using System;
using System.IO;
using System.Xml;

using Icodeon;
using Icodeon.Xml;
using Icodeon.Util;

using NUnit.Framework;


namespace Icodeon.Scorm2CC
{
    [TestFixture]
    public class PackageConverterImplTest : BaseTest
    {
        [TestFixtureSetUp]
        public void Init()
        {
            this.SetUp();
        }

        [TestFixtureTearDown]
        public void Dispose()
        {
        }

        [Test]
        public void TestConverter()
        {
            try
            {
                // this needs a copy
                IPackageConverter converter = new PackageConverterImpl();
                converter.WrapAndCopyResourceFiles(this.scormPackageDirectory, this.commonCartridgeDirectory, this.scorm2ccDirectory,null);
                converter.TransformImsManifest(this.scormPackageDirectory, this.commonCartridgeDirectory, this.xslFile, this.xslFile, null);

            }
            catch (Exception e)
            {
                System.Console.WriteLine(e.Message);
                if (e.InnerException != null)
                {
                    System.Console.WriteLine(e.InnerException.Message);
                }
                System.Console.WriteLine(e.StackTrace);
                Assert.Fail(e.Message);
            }
        }
    }
}
